-- GENERATED SPELL FOR [Hakkari Bloodkeeper] --


function spell0_8438(pUnit, Event) --@Corruption,n/a--
pUnit:FullCastSpellOnTarget(11671,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8438', 18000, 1)
end

function spell1_8438(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8438', 3000, 1)
end

function spell2_8438(pUnit, Event) --@Summoned Demon,Self--
pUnit:FullCastSpellOnTarget(7741,pUnit)
pUnit:RegisterEvent('Sorts_8438', 560, 1)
end

function Sorts_8438(pUnit, Event)
local choix_sorts_8438 = math.random(0, 2)
if choix_sorts_8438 == 0 then
pUnit:RegisterEvent('spell0_8438', 1, 1)
end
if choix_sorts_8438 == 1 then
pUnit:RegisterEvent('spell1_8438', 1, 1)
end
if choix_sorts_8438 == 2 then
pUnit:RegisterEvent('spell2_8438', 1, 1)
end
end

function mob8438_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8438', math.random(1500, 3000), 1)
end

function mob8438_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8438_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8438_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8438, 1, 'mob8438_Action')
RegisterUnitEvent(8438, 2, 'mob8438_Leave')
RegisterUnitEvent(8438, 3, 'mob8438_Kill')
RegisterUnitEvent(8438, 4, 'mob8438_Die')
